#include "myloginicon.h"
#include <QDialog>
#include <QDebug>
#include "../common/mymask.h"

MyLoginIcon::MyLoginIcon(QWidget *parent) : QLabel(parent)
{
    //登陆头像图片和mask
    QString loginAvator = ":/icon/source/common/LoginWindow_BigDefaultHeadImage.png";
    MyMask mymask(loginAvator);
    QPixmap pixmap = mymask.GetCirclePixMap(0, 0, 80, 80);
    this->setPixmap(pixmap);

    //登陆头像边框样式
    enterStyle = "border:1.5px; border-style:solid; border-color:#5ecff3; border-radius:50%;overflow:hidden;";
    leaveStyle = "border:1px; border-style:solid;border-color:#cfd1d3; border-radius:50%;overflow:hidden;";
    this->setStyleSheet(leaveStyle);
}


void MyLoginIcon::enterEvent(QEvent *){
    qDebug()<<"鼠标进入"<<endl;
    this->setStyleSheet(enterStyle);

}

void MyLoginIcon::leaveEvent(QEvent *){
    qDebug()<<"鼠标离开"<<endl;
    this->setStyleSheet(leaveStyle);

}
